<?php

class Updatepictureforeignkey extends Doctrine_Migration_Base {
  public function up() {
    $this->dropForeignKey('picture', 'picture_vehicle_id_vehicle_id');
    $definition = array(
            'local'         => 'vehicle_id',
            'foreign'       => 'id',
            'foreignTable'  => 'vehicle',
            'onDelete'      => 'CASCADE'
    );
    $this->createForeignKey('picture', 'vehicle_id', $definition);
  }

  public function down() {
  }
}
